Hey there! I was wondering what the proper usage of centerprint is because just using centerprint "MY TEXT" doesn't seem to work. How should it be used in scripting?
Hey there! I was wondering what the proper usage of centerprint is because just using centerprint "MY TEXT" doesn't seem to work. How should it be used in scripting?
You can use the message_print.scr built in to the game, it works like this:
exec global/message_print.scr::message "My Message Goes Here" NIL 10
//*** displays text in the center of the screen //*** mainly used for hint text (default), but can be for anything //*** syntax -------------------------------- //*** message <string> [no hint text | non-NIL - will display, NIL - won't display] [time to leave message up, default 5 | 0 - means default]
Or you can use a location print, just have to play around with the location until you get the center of the screen,
self stufftext "locationprint 500 50 My-Message-Cant-Have-Spaces-This-Way"
Tx I'll give give a try to message_print script. locationprint would be a good alternative but I'm pretty sure the message won't be centered for all resolution..but is centerprint bugged? I do remember I`ve had some problems with it a long ago.
centerprint works same way as locationprint, via stufftext and replacing spaces with dashes or underscores
local.text = "Hello_World"; local.player stufftext ("centerprint " + local.text);
Great eduzappa18 !!!
I was looking for it some time ago!
Buen trabajo COMPADRE !!!